<!doctype html>
<html lang="en" dir="ltr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="generator" content="Docusaurus v2.0.0-alpha.72">
<link rel="alternate" type="application/rss+xml" href="/zh-cn.neutralinojs.github.io/blog/rss.xml" title="Neutralinojs Blog RSS Feed">
<link rel="alternate" type="application/atom+xml" href="/zh-cn.neutralinojs.github.io/blog/atom.xml" title="Neutralinojs Blog Atom Feed">
<link rel="preconnect" href="https://www.google-analytics.com">
<link rel="preconnect" href="https://www.googletagmanager.com">
<script async src="https://www.googletagmanager.com/gtag/js?id=UA-120983955-1"></script>
<script>function gtag(){dataLayer.push(arguments)}window.dataLayer=window.dataLayer||[],gtag("js",new Date),gtag("config","UA-120983955-1",{anonymize_ip:!0})</script>
<script src="https://media.ethicalads.io/media/client/ethicalads.min.js"></script>
<script src="https://pagead2.googlesyndication.com/pagead/js/adsbygoogle.js" async></script><title data-react-helmet="true">使用JavaScript，HTML和CSS构建轻量级跨平台桌面应用 | Neutralinojs</title><meta data-react-helmet="true" property="og:title" content="使用JavaScript，HTML和CSS构建轻量级跨平台桌面应用 | Neutralinojs"><meta data-react-helmet="true" name="description" content="Neutralinojs是一个用于构建轻量级跨平台桌面应用的框架，它允许您使用JavaScript、HTML和CSS。"><meta data-react-helmet="true" property="og:description" content="Neutralinojs是一个用于构建轻量级跨平台桌面应用的框架，它允许您使用JavaScript、HTML和CSS。"><meta data-react-helmet="true" property="og:url" content="https://wll8.gitee.io/zh-cn.neutralinojs.github.io/zh-cn.neutralinojs.github.io/"><meta data-react-helmet="true" name="docusaurus_locale" content="en"><meta data-react-helmet="true" name="docusaurus_tag" content="default"><link data-react-helmet="true" rel="shortcut icon" href="/zh-cn.neutralinojs.github.io/img/favicon.png"><link data-react-helmet="true" rel="canonical" href="https://wll8.gitee.io/zh-cn.neutralinojs.github.io/zh-cn.neutralinojs.github.io/"><link data-react-helmet="true" rel="alternate" href="https://wll8.gitee.io/zh-cn.neutralinojs.github.io/zh-cn.neutralinojs.github.io/" hreflang="en"><link data-react-helmet="true" rel="alternate" href="https://wll8.gitee.io/zh-cn.neutralinojs.github.io/zh-cn.neutralinojs.github.io/" hreflang="x-default"><script data-react-helmet="true">function maybeInsertBanner(){window.__DOCUSAURUS_INSERT_BASEURL_BANNER&&insertBanner()}function insertBanner(){var n=document.getElementById("docusaurus-base-url-issue-banner-container");if(n){n.innerHTML='\n<div id="docusaurus-base-url-issue-banner" style="border: thick solid red; background-color: rgb(255, 230, 179); margin: 20px; padding: 20px; font-size: 20px;">\n   <p style="font-weight: bold; font-size: 30px;">Your Docusaurus site did not load properly.</p>\n   <p>A very common reason is a wrong site <a href="https://v2.docusaurus.io/docs/docusaurus.config.js/#baseurl" style="font-weight: bold;">baseUrl configuration</a>.</p>\n   <p>Current configured baseUrl = <span style="font-weight: bold; color: red;">/zh-cn.neutralinojs.github.io/</span> </p>\n   <p>We suggest trying baseUrl = <span id="docusaurus-base-url-issue-banner-suggestion-container" style="font-weight: bold; color: green;"></span></p>\n</div>\n';var e=document.getElementById("docusaurus-base-url-issue-banner-suggestion-container"),s=window.location.pathname,r="/"===s.substr(-1)?s:s+"/";e.innerHTML=r}}window.__DOCUSAURUS_INSERT_BASEURL_BANNER=!0,document.addEventListener("DOMContentLoaded",maybeInsertBanner)</script><link rel="stylesheet" href="/zh-cn.neutralinojs.github.io/assets/css/styles.b7ecac1c.css">
<link rel="preload" href="/zh-cn.neutralinojs.github.io/assets/js/styles.c25d7c9f.js" as="script">
<link rel="preload" href="/zh-cn.neutralinojs.github.io/assets/js/runtime~main.da1bdab8.js" as="script">
<link rel="preload" href="/zh-cn.neutralinojs.github.io/assets/js/main.22927eab.js" as="script">
<link rel="preload" href="/zh-cn.neutralinojs.github.io/assets/js/1.a80d899d.js" as="script">
<link rel="preload" href="/zh-cn.neutralinojs.github.io/assets/js/2.818fc9a7.js" as="script">
<link rel="preload" href="/zh-cn.neutralinojs.github.io/assets/js/c4f5d8e4.c460ab5a.js" as="script">
</head>
<body>
<script>!function(){function t(t){document.documentElement.setAttribute("data-theme",t)}var e=function(){var t=null;try{t=localStorage.getItem("theme")}catch(t){}return t}();t(null!==e?e:"light")}()</script><div id="__docusaurus">
<div id="docusaurus-base-url-issue-banner-container"></div><div><a href="#main" class="skipToContent_1oUP">Skip to main content</a></div><nav class="navbar navbar--fixed-top"><div class="navbar__inner"><div class="navbar__items"><button aria-label="Navigation bar toggle" class="navbar__toggle" type="button" tabindex="0"><svg aria-label="Menu" width="30" height="30" viewBox="0 0 30 30" role="img" focusable="false"><title>Menu</title><path stroke="currentColor" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2" d="M4 7h22M4 15h22M4 23h22"></path></svg></button><a class="navbar__brand" href="/zh-cn.neutralinojs.github.io/"><img src="/zh-cn.neutralinojs.github.io/img/logo.png" alt="Neutralinojs Logo" class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><img src="/zh-cn.neutralinojs.github.io/img/logo.png" alt="Neutralinojs Logo" class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><strong class="navbar__title">Neutralinojs</strong></a><a class="navbar__item navbar__link" href="/zh-cn.neutralinojs.github.io/docs/">文档</a><a class="navbar__item navbar__link" href="/zh-cn.neutralinojs.github.io/apps/">应用</a><a class="navbar__item navbar__link" href="/zh-cn.neutralinojs.github.io/resources/">资源</a><a href="https://www.youtube.com/c/CodeZri" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">视频</a><a href="https://codezri.org/blog/neutralinojs-2024-roadmap" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">路线图</a><a class="navbar__item navbar__link" href="/zh-cn.neutralinojs.github.io/docs/release-notes/framework">发布说明</a><a href="https://github.com/neutralinojs/gsoc2024" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GSoC 2024</a></div><div class="navbar__items navbar__items--right"><a href="https://github.com/neutralinojs" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">GitHub</a><a href="https://www.patreon.com/shalithasuranga" target="_blank" rel="noopener noreferrer" class="navbar__item navbar__link">❤️ 捐赠</a><div class="react-toggle react-toggle--disabled displayOnlyInLargeViewport_GrZ2"><div class="react-toggle-track"><div class="react-toggle-track-check"><span class="toggle_71bT">🌜</span></div><div class="react-toggle-track-x"><span class="toggle_71bT">🌞</span></div></div><div class="react-toggle-thumb"></div><input type="checkbox" disabled="" aria-label="Dark mode toggle" class="react-toggle-screenreader-only"></div></div></div><div role="presentation" class="navbar-sidebar__backdrop"></div><div class="navbar-sidebar"><div class="navbar-sidebar__brand"><a class="navbar__brand" href="/zh-cn.neutralinojs.github.io/"><img src="/zh-cn.neutralinojs.github.io/img/logo.png" alt="Neutralinojs Logo" class="themedImage_1VuW themedImage--light_3UqQ navbar__logo"><img src="/zh-cn.neutralinojs.github.io/img/logo.png" alt="Neutralinojs Logo" class="themedImage_1VuW themedImage--dark_hz6m navbar__logo"><strong class="navbar__title">Neutralinojs</strong></a></div><div class="navbar-sidebar__items"><div class="menu"><ul class="menu__list"><li class="menu__list-item"><a class="menu__link" href="/zh-cn.neutralinojs.github.io/docs/">文档</a></li><li class="menu__list-item"><a class="menu__link" href="/zh-cn.neutralinojs.github.io/apps/">应用</a></li><li class="menu__list-item"><a class="menu__link" href="/zh-cn.neutralinojs.github.io/resources/">资源</a></li><li class="menu__list-item"><a href="https://www.youtube.com/c/CodeZri" target="_blank" rel="noopener noreferrer" class="menu__link">视频</a></li><li class="menu__list-item"><a href="https://codezri.org/blog/neutralinojs-2024-roadmap" target="_blank" rel="noopener noreferrer" class="menu__link">路线图</a></li><li class="menu__list-item"><a class="menu__link" href="/zh-cn.neutralinojs.github.io/docs/release-notes/framework">发布说明</a></li><li class="menu__list-item"><a href="https://github.com/neutralinojs/gsoc2024" target="_blank" rel="noopener noreferrer" class="menu__link">GSoC 2024</a></li><li class="menu__list-item"><a href="https://github.com/neutralinojs" target="_blank" rel="noopener noreferrer" class="menu__link">GitHub</a></li><li class="menu__list-item"><a href="https://www.patreon.com/shalithasuranga" target="_blank" rel="noopener noreferrer" class="menu__link">❤️ 捐赠</a></li></ul></div></div></div></nav><div class="main-wrapper"><header class="hero hero--primary heroBanner_3P7f"><div class="container"><img src="/zh-cn.neutralinojs.github.io/assets/images/logo-5db2c303f97636b1b744eec0b78805fe.gif?v=3691" alt="Neutralinojs logo animation"><h1 class="hero__title">Neutralinojs</h1><p class="hero__subtitle">使用JavaScript，HTML和CSS构建轻量级跨平台桌面应用</p><div><div data-ea-publisher="neutralino" data-ea-type="image" id="neutralino-front"></div></div><div class="buttons_1r9m"><a class="button button--outline button--secondary button--lg" href="/zh-cn.neutralinojs.github.io/docs/">开始使用</a><a href="https://discord.gg/cybpp4guTJ" target="_blank" rel="noopener noreferrer" class="button button--outline button--secondary button--lg margin-left--sm">加入Discord</a></div></div></header><div class="intro_2tII"><div class="container"><div class="row"><div class="col col--12 text--center"><h1>使用JavaScript一次构建</h1><p>在Linux、Windows、macOS、Web和Chrome浏览器上运行。</p></div><div class="col col--12"><p>Neutralinojs是一个轻量级且便携的桌面应用程序开发框架。 它让您可以使用JavaScript、HTML和CSS开发轻量级的跨平台桌面应用程序。您可以扩展Neutralinojs的任何编程语言（通过扩展IPC）并 使用Neutralinojs作为任何源文件的一部分（通过子进程IPC）。<br><br>在Electron和NWjs中，您必须安装Node.js和数百个依赖库。 嵌入式的Chromium和Node.js使得简单的应用程序变得臃肿 — 在大多数情况下，框架的重量比您的应用程序源码还要重。Neutralinojs提供了一个轻量级和 便携的SDK，作为Electron和NW.js的替代品。Neutralinojs不打包Chromium，而是使用操作系统中现有的 Web浏览器库（例如：Linux的gtk-webkit2）。 Neutralinojs实现了一个<a href="/zh-cn.neutralinojs.github.io/docs/contributing/security">安全</a>的WebSocket连接进行原生操作，并嵌入了一个静态Web服务器 来提供Web内容。此外，它还为开发人员提供了一个内置的<a href="https://github.com/neutralinojs/neutralino.js" target="_blank" rel="noopener noreferrer">JavaScript客户端库</a>。<br><br>如果您能构建一个网站，您也可以构建跨平台的桌面应用程序，因为Neutralinojs是一个使用Web技术（如JavaScript、HTML和CSS）创建原生桌面应用程序的框架。您确实可以使用您 喜爱的前端框架（Angular、React、Svelte、Vue等）来构建您的下一个Neutralinojs应用程序。<br><br></p><ul><li><a href="/zh-cn.neutralinojs.github.io/docs/getting-started/using-frontend-libraries">了解如何使用您喜爱的前端库。</a></li><li><a href="/zh-cn.neutralinojs.github.io/docs/how-to/extensions-overview">了解如何使用您喜爱的后端语言。</a></li></ul><p></p></div><div class="col col--12"><ins class="adsbygoogle" style="display:block" data-ad-client="ca-pub-4805219819571962" data-ad-slot="1174653824" data-ad-layout="in-article" data-ad-layout-key="" data-ad-format="auto" data-full-width-responsive="false"></ins></div></div></div></div><div class="hero hero--primary heroBanner_3P7f"><div class="container"><h1 class="hero__title">5分钟了解Neutralinojs</h1><p class="hero__subtitle">开始构建轻量级应用程序</p><div class="buttons_1r9m"><a class="button button--outline button--secondary button--lg" href="/zh-cn.neutralinojs.github.io/docs/">文档</a><a href="https://www.youtube.com/c/CodeZri" target="_blank" rel="noopener noreferrer" style="margin-left:12px" class="button button--outline button--secondary button--lg">教程</a></div></div></div><main><section class="features_3azU"><div class="container"><div class="row"><div class="col col--4 feature_3ctd"><div class="text--center"><img class="featureImage_ZtzX" src="/zh-cn.neutralinojs.github.io/img/undraw_in_progress_ql66.svg" alt="原生 API"></div><h3>原生 API</h3><p>Neutralinojs的JavaScript API提供了操作系统级别的功能，例如文件操作、 执行命令、显示原生对话框等。</p></div><div class="col col--4 feature_3ctd"><div class="text--center"><img class="featureImage_ZtzX" src="/zh-cn.neutralinojs.github.io/img/undraw_takeout_boxes_ap54.svg" alt="便携 &amp; 零依赖"></div><h3>便携 &amp; 零依赖</h3><p>运行Neutralinojs应用程序无需额外的依赖。最大的优势是您可以在一个平台上 为所有平台制作应用程序。无需编译器！</p></div><div class="col col--4 feature_3ctd"><div class="text--center"><img class="featureImage_ZtzX" src="/zh-cn.neutralinojs.github.io/img/undraw_social_friends_nsbv.svg" alt="跨平台支持"></div><h3>跨平台支持</h3><p>Neutralinojs应用程序可以在Linux、Windows、macOS、Web和Chrome上运行。 单个便携式应用程序可以为所有流行的操作系统和Web浏览器发布。</p></div><div class="col col--4 feature_3ctd"><div class="text--center"><img class="featureImage_ZtzX" src="/zh-cn.neutralinojs.github.io/img/undraw_upgrade_06a0.svg" alt="轻量级 &amp; 快速"></div><h3>轻量级 &amp; 快速</h3><p>一个简单的未压缩的Neutralinojs应用程序只有约2MB，压缩后的应用程序大小为 约0.5MB。确实，它不会像其他基于Chromium的跨平台应用程序开发框架那样占用物理内存 或存储。</p></div><div class="col col--4 feature_3ctd"><div class="text--center"><img class="featureImage_ZtzX" src="/zh-cn.neutralinojs.github.io/img/undraw_happy_announcement_re_tsm0.svg" alt="简单 &amp; 灵活"></div><h3>简单 &amp; 灵活</h3><p>Neutralinojs团队始终倾向于为程序员提供简单和灵活的开发接口。 该框架具有简单的便携式自动更新器和CLI。我们没有在各处使用基于OOP的类和 耗时的设置来复杂化您的工作。</p></div><div class="col col--4 feature_3ctd"><div class="text--center"><img class="featureImage_ZtzX" src="/zh-cn.neutralinojs.github.io/img/undraw_work_together_re_5yhn.svg" alt="任何后端，任何前端"></div><h3>任何后端，任何前端</h3><p>您可以使用任何前端框架搭配您喜爱的功能，例如 <a href="https://webpack.js.org/concepts/hot-module-replacement/" target="_blank" rel="noopener noreferrer">HMR</a>， 来构建Neutralinojs应用程序。此外，您可以使用Neutralinojs 作为任何源文件的一部分（通过子进程IPC），或者使用任何后端语言扩展Neutralinojs API （通过扩展IPC）。</p></div></div></div></section></main><div class="hero hero--primary heroBanner_3P7f"><div class="container"><h1 class="hero__title">开始构建轻量级应用程序！</h1><p class="hero__subtitle"><code>npm install -g @neutralinojs/neu</code></p></div></div></div><footer class="footer footer--dark"><div class="container"><div class="row footer__links"><div class="col footer__col"><h4 class="footer__title">文档</h4><ul class="footer__items"><li class="footer__item"><a class="footer__link-item" href="/zh-cn.neutralinojs.github.io/docs/">入门</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn.neutralinojs.github.io/docs/api/overview">API参考</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn.neutralinojs.github.io/docs/cli/neu-cli">CLI</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn.neutralinojs.github.io/docs/configuration/modes">模式</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn.neutralinojs.github.io/docs/contributing/framework-developer-guide">贡献</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">社区</h4><ul class="footer__items"><li class="footer__item"><a href="https://github.com/neutralinojs" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://twitter.com/neutralinojs" target="_blank" rel="noopener noreferrer" class="footer__link-item">Twitter</a></li><li class="footer__item"><a href="https://stackoverflow.com/questions/tagged/neutralinojs" target="_blank" rel="noopener noreferrer" class="footer__link-item">Stack Overflow</a></li><li class="footer__item"><a href="https://medium.com/neutralinojs" target="_blank" rel="noopener noreferrer" class="footer__link-item">Medium</a></li><li class="footer__item"><a href="https://www.youtube.com/watch?v=txDlNNsgSh8&amp;list=PLvTbqpiPhQRb2xNQlwMs0uVV0IN8N-pKj&amp;ab_channel=CodeZri" target="_blank" rel="noopener noreferrer" class="footer__link-item">YouTube</a></li><li class="footer__item"><a href="https://join.slack.com/t/neutralinojs/shared_invite/zt-b7mbivj5-pKpO6U5drmeT68vKD_pc6w" target="_blank" rel="noopener noreferrer" class="footer__link-item">Slack</a></li><li class="footer__item"><a href="https://discord.gg/cybpp4guTJ" target="_blank" rel="noopener noreferrer" class="footer__link-item">Discord</a></li><li class="footer__item"><a href="https://www.reddit.com/r/neutralinojs/" target="_blank" rel="noopener noreferrer" class="footer__link-item">Reddit</a></li></ul></div><div class="col footer__col"><h4 class="footer__title">更多</h4><ul class="footer__items"><li class="footer__item"><a href="https://github.com/neutralinojs/neutralinojs" target="_blank" rel="noopener noreferrer" class="footer__link-item">GitHub</a></li><li class="footer__item"><a href="https://www.patreon.com/shalithasuranga" target="_blank" rel="noopener noreferrer" class="footer__link-item">Patreon</a></li><li class="footer__item"><a class="footer__link-item" href="/zh-cn.neutralinojs.github.io/privacy-policy">隐私政策</a></li><li class="footer__item"><a href="https://codezri.org/blog/" target="_blank" rel="noopener noreferrer" class="footer__link-item">博客</a></li></ul></div></div><div class="footer__bottom text--center"><div class="footer__copyright">Copyright © 2024 Neutralinojs | innovation by <a href="https://codezri.org/">CodeZri.org</a></div></div></div></footer></div>
<script src="/zh-cn.neutralinojs.github.io/assets/js/styles.c25d7c9f.js"></script>
<script src="/zh-cn.neutralinojs.github.io/assets/js/runtime~main.da1bdab8.js"></script>
<script src="/zh-cn.neutralinojs.github.io/assets/js/main.22927eab.js"></script>
<script src="/zh-cn.neutralinojs.github.io/assets/js/1.a80d899d.js"></script>
<script src="/zh-cn.neutralinojs.github.io/assets/js/2.818fc9a7.js"></script>
<script src="/zh-cn.neutralinojs.github.io/assets/js/c4f5d8e4.c460ab5a.js"></script>
</body>
</html>